knitr::opts_chunk$set(echo = TRUE)

Loading Nowcasters

Loading necessary packages:

library(devtools)
library(roxygen2)

Loading the nowcaster R package:

library(nowcaster)

Loading the data from Belo Horizonte city:

data<-sragBH

And we take a look on the data:

head(data)

It is a data.frame with 7 variables and 65,404 observations. We will make use of only the first two columns, "DT_SIN_PRI" and "DT_DIGITA" as well the column "Idade" to make age structured nowcasting.

nowcasting_bh<-nowcasting_inla(dataset = data, 
                               bins_age = "10 years", 
                               data.by.week = T, 
                               return.age = T, 
                               age_col = Idade)


covid19br/nowcaster documentation built on April 13, 2025, 6:13 a.m.